import React from 'react'
import { Navigate} from 'react-router-dom'
import Login from '../pages/Login'
import ChatDb from '../pages/ChatDb'
// import ComingSoon from '../pages/CommingSoon'

const routes = [
  {
    path: '/login',
    element: <Login />,
    name: '登录'
  },
  // {
  //   path: '/commingsoon',
  //   element: <ComingSoon />,
  //   name: '即将上线'
  // },
  {
        path: '/chat2db',
        element: <ChatDb />,
        name: 'Chat2DB'
      },
     
      {
        path: '/chat2file',
        element: <ChatDb />,
        name: 'Chat2File'
      },
      {
        path: '/chat2kg',
        element: <ChatDb />,
        name: 'Chat2kg'
      },
       {
        path: '/chat2datasetting',
        element: <ChatDb />,
        name: '数据源配置和测试'
      },
      {
        path: '/chat2model',
        element: <ChatDb />,
        name: '模型管理'
      },
      {
        path: '/chat2usersetting',
        element: <ChatDb />,
        name: '用户设置'
      },
  {
    path: '/',
    element: process.env.REACT_APP_LOGIN_STATUS === 'false' ? <Navigate to="/chat2db" /> : <Navigate to="/login" />,
    name: '默认路由',
  }
];
 export default routes 